package cn.xianshu.quartz.job;


import org.quartz.Job;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.stereotype.Component;

@Component
public class PrintTimeJob implements Job {

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {

        JobDataMap jobDataMap = jobExecutionContext.getJobDetail().getJobDataMap(); // 获取数据
        String name = jobExecutionContext.getJobDetail().getKey().getName();
       /* System.out.println(name + "定时执行任务:" + jobDataMap.getString("params"));*/
    }
}
